'''线性同余法生成随机数'''
# a = 217
# b = 11
# c = 253
a = 217
b = 11
c = 32768
f = lambda x : (a * x + b) % c 
x = 1

xs = []
ys = []

for i in range(8000):
    xs.append(i)
    ys.append(x)
    # print(x)
    x = f(x)

import numpy as np
import matplotlib.pyplot as plt 

x = np.array(xs)
y = np.array(ys)

plt.scatter(x,y)
plt.show()